import 'package:flutter/material.dart';
import 'package:flutter_ability/custom_ui.dart';

class EmptyImgPage extends StatefulWidget {
  const EmptyImgPage({Key? key}) : super(key: key);

  @override
  State<EmptyImgPage> createState() => _EmptyImgPageState();
}

class _EmptyImgPageState extends State<EmptyImgPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: YJAppBar(
        isScaffold: true,
        leadingType: YJAppBarType.back,
        title: TextView.text("Empty 缺省插图"),
        backgroundColor: YJColors.WHITE,
      ),
      backgroundColor: YJColors.WHITE,
      body: buildContainer(),
    );
  }

  Container buildContainer() {
    return Container(
      padding: const EdgeInsets.only(top: 20),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Container(
            color: const Color(0xFFFFA2A2),
            height: YJSize.dp(52),
            width: YJSize.screenWidth,
            alignment: Alignment.center,
            child: TextView.text("※ 所有插图所在位置，距上个容器距离固定为52"),
          ),
          Container(
            width: YJSize.dp(150),
            height: YJSize.dp(120),
            alignment: Alignment.center,
            color: YJColors.TRANSPARENT,
            child: const YJImage(
              "assets/icon_no_data.png",
              width: 150,
              height: 120,
            ),
          ),
          Container(
            color: const Color(0xFFFFA2A2),
            height: YJSize.dp(24),
            width: YJSize.screenWidth,
            alignment: Alignment.center,
            child: TextView.text("※ 所有插图所在位置，描述文案距插图固定为24"),
          ),
          Container(
            width: YJSize.dp(150),
            height: YJSize.dp(120),
            alignment: Alignment.center,
            color: YJColors.TRANSPARENT,
            child: const YJImage(
              "assets/icon_content_miss.png",
              width: 150,
              height: 120,
            ),
          ),
          Container(
            color: const Color(0xFFFFA2A2),
            height: YJSize.dp(24),
            width: YJSize.screenWidth,
            alignment: Alignment.center,
          ),
          Container(
            width: YJSize.dp(150),
            height: YJSize.dp(120),
            alignment: Alignment.center,
            color: YJColors.TRANSPARENT,
            child: const YJImage(
              "assets/icon_no_gift_pack.png",
              width: 150,
              height: 120,
            ),
          ),
          Container(
            color: const Color(0xFFFFA2A2),
            height: YJSize.dp(24),
            width: YJSize.screenWidth,
            alignment: Alignment.center,
          ),
          Container(
            width: YJSize.dp(150),
            height: YJSize.dp(120),
            alignment: Alignment.center,
            color: YJColors.TRANSPARENT,
            child: const YJImage(
              "assets/icon_no_follow.png",
              width: 150,
              height: 120,
            ),
          ),
        ],
      ),
    );
  }
}
